<?php

Class teamsModel extends CI_Model {

	public function __construct() {
		parent::__construct();
	}

	public function readAll() {
		$query = $this->db->get('teams');
		return $query->result();
	}

	public function create($array = null) {
		if ($array == null) return false;
		$query = $this->db->insert('teams', $array);
	}

	public function update($array = null) {
		if ($array == null) return false;
		$this->db->where("id_team", $array["id_team"]);
		$query = $tihs->db->update("teams", $array);
	}

	public function delete($array = null) {
		if ($array == null) return false;
		$this->db->where("id_team", $array["id_team"]);
		$query = $this->db->delete("teams", $array);
	}
}